<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/template/common/include/top.jsp"%>
<%@include file="/template/common/include/constant.jsp"%>
<script type="text/javascript" src="<%=path%>/template/js/right_function.js"></script>
<body>
  <div class="main1">当前的位置:权限设置</div>
    <form action="<%=path%>/rightsettings.x"  method="post">
    <input type="hidden" name="op" value="find" />
      <div class="main_search">
        权限名称:<input type="text" name="f(rightName)" value="${fmap.rightName}" />
       url:<input type="text" name="f(url)" value="${fmap.url}" />
       op:<input type="text" name="f(op)" value="${fmap.op}" />
       <input name="Submit" type="submit" class="search" value="搜索" />
      </div>
    </form>
    <div class="main_list">
    <div class="main_list_left">权限列表</div>
    <div class="main_edit">
    <input type="button" onclick="addRightSettings();" value="添加" class="edit_ad" />
    <input type="button" onclick="delRightSettings();" value="删除" class="edit_ad" /> 
      </div>
    </div>
    <form method="post" action="<%=path%>/rightsettings.x" id="listFrm" d_op="find">
    <input type="hidden" id="id_op" name="op" value="find" />
    <input type="hidden" id="id_r_id" name="r.id" value="" />
    ${sys_searchparemeter}
    <div class="list_div">
      <table>
        <tr>
          <th width="2%"><input type="checkbox" onclick="checkByName('ids',this.checked);" /></th>
          <th width="15%"><a href="javascript:sort('rightName','listFrm');" id="sort_rightName" >权限名称</a></th>
          <th width="60%"><a href="javascript:sort('url','listFrm');" id="sort_url" >url</a></th>
          <th width="15%"><a href="javascript:sort('op','listFrm');" id="op" >op</a></th>
          <th width="8%">操作</th>
        </tr>
        <c:forEach items="${pageBean.retList}" var="row">
        <tr>
          <td>
            <input type="checkbox" name="ids" value="${row.id }" />
          </td>
          <td>${row.rightName}</td>
          <td>${row.url}</td>
          <td>${row.op}</td>
          <td>
            <a href="javascript:commit('listFrm',[['id_op','edit'],['id_r_id','${row.id}']]);"><img src="<%=path%>/template/images/cz_2.gif" alt="编辑" border="0"></a>
            <a href="javascript:commit('listFrm',[['id_op','switchStatus'],['id_r_id','${row.id}']]);">
          </a>
          <a href="javascript:commit('listFrm',[['id_op','delete']],check('ids','${row.id}'));" onclick="return confirm('是否要删除此条记录')"><img src="<%=path%>/template/images/cz_1.gif" alt="删除" border="0"></a>
          </td>
        </tr>
        </c:forEach>
      </table>
      </div>
      <div class="main_page">
        <%@include file="/template/common/include/pagefooter.jsp"%>
      </div>
    </form>    
</body>
